@echo off
rem *** This batch file written by MCH for Tahoe Software Productions ***
cls
:MENU
echo.
echo "Barbie - Super Model" Programmed by Matthew C. Harmon
echo.
echo A - Full Make              (Assemble, link and download all)
echo B - Assemble/Link BARBIE   (Main code)
echo C - Assemble/Link SEGA     (Initialization code)
echo D - Assemble/Link B_GFX_1  (Graphics in bank 4)
echo E - Assemble/Link B_GFX_2  (Graphics in bank 5)
echo F - Assemble/Link B_GFX_3  (Graphics in bank 7)
echo G - Assemble/Link B_GFX_4  (Graphics in bank 8)
echo H - Assemble/Link OBJECTS  (Objects Lists in bank 6)
echo I - Assemble/Link SOUNDS   (Sound Driver)
echo J - Assemble/Link EQUATES  (Equates and RAM layout for Sound Driver)
echo K - Assemble/Link MISC     (Miscellaneous sound routines)
echo.
echo X - Backup code and art to BACKUP directory on C:
echo Y - Backup code and art to floppy in A:
echo.
echo Z - Download all to Target
echo Q - Quit
echo ? - This Menu
echo.
:START
choice /c:abcdefghijkxyzq? "Selection "
rem choice??
if errorlevel 16 goto :MENU
if errorlevel 15 goto :EXIT
if errorlevel 14 goto :DLOAD
if errorlevel 13 goto :EXIT
if errorlevel 12 goto :EXIT
if errorlevel 11 goto :EXIT
if errorlevel 10 goto :EXIT
if errorlevel 9 goto :SOUNDS
if errorlevel 8 goto :OBJECTS
if errorlevel 7 goto :B_GFX_4
if errorlevel 6 goto :B_GFX_3
if errorlevel 5 goto :B_GFX_2
if errorlevel 4 goto :B_GFX_1
if errorlevel 3 goto :SEGA
if errorlevel 2 goto :BARBIE
goto FULL

:FULL
echo Assembling BARBIE...
cd \gamegear\barbie\code\main
asm80 barbie
echo Assembling SEGA...
cd \gamegear\barbie\code\init
asm80 sega
echo Assembling B_GFX_1...
cd \gamegear\barbie\code\gfx
asm80 b_gfx_1
echo Assembling B_GFX_2...
cd \gamegear\barbie\code\gfx
asm80 b_gfx_2
echo Assembling OBJECTS...
cd \gamegear\barbie\code\objects
asm80 objects
cd..
goto START

:BARBIE
cd \gamegear\barbie\code\main
asm80 barbie
cd..
choice /c:ynq "Link BARBIE and SEGA "
if errorlevel 3 goto EXIT
if errorlevel 2 goto START
lnkz80 -c scripts\barbie.cmd
goto START

:SEGA
cd \gamegear\barbie\code\init
asm80 sega
cd..
choice /c:ynq "Link BARBIE and SEGA "
if errorlevel 3 goto EXIT
if errorlevel 2 goto START
lnkz80 -c scripts\barbie.cmd
goto START

:B_GFX_1
cd \gamegear\barbie\code\gfx
asm80 b_gfx_1
cd..
choice /c:ynq "Link B_GFX_1 "
if errorlevel 3 goto EXIT
if errorlevel 2 goto START
lnkz80 -c scripts\b_gfx_1.cmd
goto START

:B_GFX_2
cd \gamegear\barbie\code\gfx
asm80 b_gfx_2
cd..
choice /c:ynq "Link B_GFX_2 "
if errorlevel 3 goto EXIT
if errorlevel 2 goto START
lnkz80 -c scripts\b_gfx_2.cmd
goto START

:B_GFX_3
cd \gamegear\barbie\code\gfx
asm80 b_gfx_3
cd..
choice /c:ynq "Link B_GFX_3 "
if errorlevel 3 goto EXIT
if errorlevel 2 goto START
lnkz80 -c scripts\b_gfx_3.cmd
goto START

:B_GFX_4
cd \gamegear\barbie\code\gfx
asm80 b_gfx_4
cd..
choice /c:ynq "Link B_GFX_4 "
if errorlevel 3 goto EXIT
if errorlevel 2 goto START
lnkz80 -c scripts\b_gfx_4.cmd
goto START

:OBJECTS
cd \gamegear\barbie\code\objects
asm80 objects
cd..
choice /c:ynq "Link OBJECTS "
if errorlevel 3 goto EXIT
if errorlevel 2 goto START
lnkz80 -c scripts\objects.cmd
goto START

:SOUNDS
cd \gamegear\barbie\code\fx
asm80 sounds.asm
cd..
choice /c:ynq "Link BARBIE, SEGA, SOUNDS, EQUATES and MISC "
if errorlevel 3 goto EXIT
if errorlevel 2 goto START
lnkz80 -c scripts\barbie.cmd
goto START

:DLOAD
cd \gamegear\barbie\code
erxz80 scripts\barbie.erx

:EXIT
echo on
